<?php

class Thongke_model extends Model
{
	// Protected or private properties
	protected $_table;
	
	// Constructor
	public function __construct()
	{
		parent::Model();
			
		$this->_table = $this->config->item('database_tables');
	}

	// Public methods
	
	public function get_post_count()
	{
		$this->db->select('id');
		$this->db->from('site_content');
		return $this->db->count_all_results();
	}
	
	public function get_post_category_count()
	{
		$this->db->select('id');
		$this->db->from('site_category');
		return $this->db->count_all_results();
	}
	
	public function get_page_count()
	{
		$this->db->select('id');
		$this->db->from('site_page');
		return $this->db->count_all_results();
	}
	
	public function get_link_count()
	{
		$this->db->select('id');
		$this->db->from('site_banner');
		$this->db->where('type',1);
		return $this->db->count_all_results();
	}
	
	public function get_banner_count()
	{
		$this->db->select('id');
		$this->db->from('site_banner');
		$this->db->where('type',2);
		return $this->db->count_all_results();
	}
	
}

/* End of file thongke_model.php */
/* Location: ./application/modules/admin/models/thongke_model.php */